home *** CD-ROM | disk | FTP | other *** search
-
- /* Generated by Interface Builder */
-
- #import <objc/Object.h>
- #import <appkit/nextstd.h> /* gets stdio */
- #import <appkit/Form.h> /* for NXCoord, etc. */
- #import <appkit/color.h>
- #import "ScrollWindow.h" // added 10-7-91 by pdhowell
-
- typedef struct _datahunk {
- char *filename;
- float *x;
- float *ex; /* for error bars */
- float **y;
- float **ey; /* for error bars */
- int npoints;
- int ncurves;
- NXPoint datamin;
- NXPoint datamax;
- BOOL xaxislin;
- BOOL yaxislin;
- BOOL has_exbars; /* for error bars */
- BOOL has_eybars; /* for error bars */
- } datahunk;
-
- @interface Plot:Object
- {
- id datahunkArray; /* array of datahunk structs (a Storage object) */
- id yMax; /* the yMax object */
- id xMax; /* the xMax object */
- id canvas; /* the PlotView object */
- id yMin; /* the yMin object */
- id xMin; /* the xMin object */
- id yInc; /* the yInc object */
- id xInc; /* the xInc object */
- id lineText; /* the lineText object */
- id symbolText; /* the symbolText object */
- id lineMatrix; /* the lineMatrix object */
- id symbolMatrix; /* the symbolMatrix object */
- id plotButton; /* the plot Button object */
- id xLinLog; /* the x-axis linear/logarithmic button */
- id yLinLog; /* the y-axis linear/logarithmic button */
- id legendForm; /* for the curve titles on the legend */
- id changeLegendFont; /* the change legend font on/off button */
- id changeLegendTitleFont; /* the change leg. title font on/off button */
- id changeXTitleFont; /* the change x title font on/off button */
- id changeYTitleFont; /* the change y title font on/off button */
- id changeMainTitleFont; /* the change main title font on/off button */
- id changeTicLabelFont; /* the change tic label font on/off button */
- id curveNumber; /* the TextField on the color panel */
- id curveColorWell; /* color well for the curves */
- id backgroundColorWell; /* color well for background */
- id textColorWell; /* color well for text */
- id columnPanel; /* the Column Selection panel */
- id columnSelectionHandler; /* manages the Column Selection panel */
- id accPrintColorButton; /* print color button on accessories panel */
- id accPrintLineStyleButton;/* line style button on accessories panel */
- id printPreview; /* are we previewing before printing? */
- id binaryOpenAccessory; /* accessory view for binary open */
- id binaryOpenForm; /* how many curves in the binary file */
- id binaryXdatathere; /* is there X data in the binary file? */
- id writeDataAccButton; /* should we write ascii or binary? */
- id errorBars; /* the error bars pop-up list*/
- id errorBarPanel; /* the panel with information about error bars */
- id errorBarHandler; /* manages the error bar panel */
- id fileRemovalPanel; /* for selective file removal */
- id fileRemovalMatrix; /* filenames in file removal window */
- id fileRemovalButtons; /* buttons for clicking on filenames */
-
- int ncurvestotal; /* total number of curves */
- int nfilestotal; /* total no. of files "open" */
-
- NXPoint globaldatamin; /* xmin and ymin from the data */
- NXPoint globaldatamax; /* xmax and ymax from the data */
-
- NXPoint oldMin; /* for use by "previous view" */
- NXPoint oldMax; /* ditto */
- NXPoint oldInc; /* ditto */
- NXPoint currentMin; /* ditto */
- NXPoint currentMax; /* ditto */
- NXPoint currentInc; /* ditto */
-
- int beepError;
-
- NXColor backgroundcolor, textcolor;
- NXColor *curvecolors;
- BOOL colorOption;
-
- // these lines added by pdhowell
- id lineMatrixWindow; /* the lineMatrix object's Window */
- id symbolMatrixWindow; /* the symbolMatrix object's Window */
- id legendFormWindow; /* the legendForm object's Window */
- }
-
- /* class methods */
- + initialize;
-
- /* instance methods */
- - init;
- - makeSomeScrollWindows; // added by pdhowell
-
- - (NXCoord *)xdata:(int)n;
- - (NXCoord *)exdata:(int)n;
- - (NXCoord **)ydata:(int)n;
- - (NXCoord **)eydata:(int)n;
- - (BOOL)has_exbars:(int)n;
- - (BOOL)has_eybars:(int)n;
-
- - (int) nPoints:(int)n;
- - (int) nCurves:(int)n;
- - (char *) filename:(unsigned)n;
- - (int) nCurvesTotal;
- - (int) nFiles;
-
- - makeLineStyle:(int)aCurve :(int)lineStyle;
- - makeSymbolType:(int)aCurve :(int)symType;
-
- - (BOOL) xaxisLog;
- - (BOOL) yaxisLog;
- - forceXaxisLinear;
- - forceYaxisLinear;
- - forceXaxisLog;
- - forceYaxisLog;
- - (BOOL) shouldChangeLegendFont;
- - (BOOL) shouldChangeLegendTitleFont;
- - (BOOL) shouldChangeXTitleFont;
- - (BOOL) shouldChangeYTitleFont;
- - (BOOL) shouldChangeMainTitleFont;
- - (BOOL) shouldChangeTicLabelFont;
-
- - (int)providelinestyle: (int)aCurve;
- /* 0=solid, 1=dash, 2=dot, 3=chain dash */
- /* 4=chain dot, 5=none : see defs.h */
- - (int)providesymbolstyle: (int)aCurve;
- /* 0=none, 1=circle, 2=x, 3=up triangle */
- /* 4=down triangle, 5=diamond, 6=square */
- /* 7=plus : see defs.h */
-
- - (double)provideXmin;
- - (double)provideXmax;
- - (double)provideXinc;
- - (double)provideYmin;
- - (double)provideYmax;
- - (double)provideYinc;
-
- - (float)provideGlobalXmin;
- - (float)provideGlobalYmin;
-
- - resetXmin:(double)x;
- - resetXmax:(double)x;
- - resetXinc:(double)x;
- - resetYmin:(double)x;
- - resetYmax:(double)x;
- - resetYinc:(double)x;
-
- - resetMinMax:sender;
-
- - drawPlotButton:(int)state;
-
- - drawPlot:sender;
-
- - (int) readData:(NXStream *)aDataStream :(char *)fname;
-
- - checkLinLog:(datahunk *)pdh;
- - checkGlobalLinLog;
-
- - findMinMax:(datahunk *)pdh;
- - findGlobalMinMax;
- - niceMinMaxInc;
-
- - adjustLineStyleMatrix:(int)column :(int)row;
- - adjustSymbolTypeMatrix:(int)column :(int)row;
- - redisplayLineStyleMatrix;
- - redisplaySymbolTypeMatrix;
- - adjustPanels:(int)oldn :(int)newn;
-
- - open:sender;
-
- - openFile:(char *)dataFile :(char *)realName;
-
- - plotPrepAndDraw;
-
- - removeAllFiles:sender;
-
- - fixFileRemovalPanel:sender;
-
- - removeSomeFiles:sender;
-
- - removeAndOpen:sender;
-
- - sanityCheck;
-
- - writeDataFiles:sender;
-
- - (NXColor) provideBackgroundColor;
- - (NXColor) provideTextColor;
- - (NXColor) provideCurveColor:(int)aCurve;
-
- - setBackgroundColor:sender;
- - setTextColor:sender;
- - setCurveColor:sender;
- - forceBackgroundColor:(NXColor)aColor;
- - forceTextColor:(NXColor)aColor;
- - forceCurveColor:(int)curvenum :(NXColor)aColor;
-
- - colorOn:(BOOL)onOff;
-
- - fixMatrixColumn:sender;
-
- - swapColumns:(int)prev_col :(int)col forFileNumber:(int)i;
-
- - stackOldMinMax:(float)xmin :(float)xmax :(float)ymin :(float)ymax;
-
- - openBinary:sender;
-
- - openBinaryFile:(char *)dataFile;
-
- - (int) readBinaryData:(NXStream *)aDataStream :(char *)fname :(int)numcurves
- :(int)numpoints :(BOOL)xdatathere;
-
- - preludeToReading:(char *)fname :(datahunk **)pdh;
-
- - postludeToReading:(char *)fname :(int)oldncurves :(datahunk *)pdh;
-
- @end
-